Filter Iowa bridges by deck condition only, matching the renderer#22
Merged
Conversation
The condition checkboxes built a definition expression that matched a bridge if ANY of DECK_COND_058, SUPERSTRUCTURE_COND_059, or SUBSTRUCTURE_COND_060 fell in the selected range. But the map's UniqueValueRenderer colors each dot solely by DECK_COND_058, so a bridge could keep a "Good"-colored dot while qualifying through a poor superstructure/substructure rating, making dots persist after the user unchecked the box for their visible color. Filter on the same field the renderer symbolizes by so the dots that disappear always match the unchecked boxes. Also drops the stale comment referencing an "Arcade renderer" (the renderer classifies by DECK_COND_058 directly). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ejz9vZZjusM5qtxqzXyDSk
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The Iowa Bridges sample's sidebar condition filter built a definition expression matching a bridge if any of
DECK_COND_058,SUPERSTRUCTURE_COND_059, orSUBSTRUCTURE_COND_060fell in the selected NBI code range. The map'sUniqueValueRenderer, however, colors each dot solely byDECK_COND_058.That mismatch meant a bridge could keep a "Good"-colored dot (deck = 8) while still qualifying through a poor superstructure or substructure rating, so dots would persist on the map after the user unchecked the box for their visible color.
This changes
BridgeFilterState.BuildConditionClause()to filter on the same field the renderer symbolizes by:Now the dots that disappear always match the unchecked boxes. Also removes a stale comment that referenced an "Arcade renderer" — the renderer classifies by
DECK_COND_058directly (see theDEVIATION FROM PROMPTnote inBridgeRendererFactory).Why
Keeps the live demo, the accompanying blog post, and this sample consistent on how condition filtering works.
Testing
dotnet buildsucceeds.🤖 Generated with Claude Code